#!/usr/bin/perl

use utf8;
use strict;

chomp (my @lines = <STDIN>);
print "matched fred or Fred:\n";
foreach (@lines) {
	if (/[fF]red/){
		print $_, "\n";
	}
}